<template>
  <div>
    <van-tabs @click="onClick">
      <van-tab
        v-for="(item, index) in matchNameList"
        :title="item"
        :key="index"
      >
       <router-view />
      </van-tab>
    </van-tabs>
  </div>
</template>

<script>
export default {
  data() {
    return {
      matchNameList: ["NBA", "北京冬奥会", "国际足球", "中国足球"],
    };
  },
  methods:{
        onClick(name,title) {
    //   Toast(title);
    // console.log(title);
      this.$router.push({name:`${title}`})
    },
  }
};
</script>

<style>
</style>